<div class="midias view">
<h2><?php  echo __('Midia'); ?></h2>
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($midia['Midia']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Filme'); ?></dt>
		<dd>
			<?php echo $this->Html->link($midia['Filme']['id'], array('controller' => 'filmes', 'action' => 'view', $midia['Filme']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Codigo'); ?></dt>
		<dd>
			<?php echo h($midia['Midia']['codigo']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Disponivel'); ?></dt>
		<dd>
			<?php echo h($midia['Midia']['disponivel']); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Midia'), array('action' => 'edit', $midia['Midia']['id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Midia'), array('action' => 'delete', $midia['Midia']['id']), null, __('Are you sure you want to delete # %s?', $midia['Midia']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Midias'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Midia'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Filmes'), array('controller' => 'filmes', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Filme'), array('controller' => 'filmes', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Locacoes'), array('controller' => 'locacoes', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Locacao'), array('controller' => 'locacoes', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Locacoes'); ?></h3>
	<?php if (!empty($midia['Locacao'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Midia Id'); ?></th>
		<th><?php echo __('Usuario Id'); ?></th>
		<th><?php echo __('Data'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($midia['Locacao'] as $locacao): ?>
		<tr>
			<td><?php echo $locacao['id']; ?></td>
			<td><?php echo $locacao['midia_id']; ?></td>
			<td><?php echo $locacao['usuario_id']; ?></td>
			<td><?php echo $locacao['data']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'locacoes', 'action' => 'view', $locacao['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'locacoes', 'action' => 'edit', $locacao['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'locacoes', 'action' => 'delete', $locacao['id']), null, __('Are you sure you want to delete # %s?', $locacao['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Locacao'), array('controller' => 'locacoes', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
